<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div>&nbsp;</div>
		<div id="d1"></div>
		<script>
		    function showtime() {
		        var now = new Date();
		
		        var y = now.getFullYear();
		        var m = now.getMonth() + 1;
		        var d = now.getDate();
		
		        var h = now.getHours();
		        var f = now.getMinutes();
		        var s = now.getSeconds();
		
		        var w = now.getDay()
		
		        if (h < 12) {
		            var timestr = y + "年" + m + "月" + d + "日" + "  " + h + ":" + f + ":" + s + "  " + "AM" + "  " + "星期" + ["日", "一", "二", "三", "四", "五", "六"][w]
		            d1.innerHTML = timestr
		        } else if (h > 12) {
		            h = h - 12
		            var timestr = y + "年" + m + "月" + d + "日" + "  " + h + ":" + f + ":" + s + "  " +  "  " + "星期" + ["日", "一", "二", "三", "四", "五", "六"][w]
		            d1.innerHTML = timestr
		        }
		
		
		    }
		    setInterval(showtime, 1)
	</body>
</html>
